<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title></title>
    <link rel="stylesheet" href="/css/wmd.css" type="text/css" />
  </head>
  <body>
      <div>
          {foreach from=$articles name=articles item=article}
          <div>
              <div>
                  <h2>
                      <a href="/article/detail/{$article.id}">{$article.title}</a>
                      {if $article.author eq $user_id}<a href="/article/edit/{$article.id}">编辑</a>{/if}
                  </h2>
              </div>
              <div>{$article.content}</div>
              <div>
                  {foreach from=$article.tags name=tags item=tag}
                  <a href="/article/tag/{$tag}">{$tag}</a>
                  {/foreach}
              </div>
          </div>
          {/foreach}
      </div>

      
      <script type="text/javascript" src="/js/jquery.min.js"></script>
      <script type="text/javascript" src="/js/prettify.js"></script>
      <script type="text/javascript">
          (function($) {
              prettyPrint();
          })(jQuery);
      </script>
  </body>
</html>
